Event-B Code Generation: Type Extension with Theories
نویسندگان
چکیده
The Event-B method is a formal modelling approach; our interest is the final step, of generating code for concurrent programs, from Event-B. Our Tasking Event-B tool integrates Event-B to facilitate code generation. The theory plug-in allows mathematical extensions to be added to an Event-B development. When working at the implementation level we need to consider how to translate the newly added types and operators into code. In this paper, we augment the theory plug-in, by adding a Translation Rules section to the tool. This enables us to define translation rules that map Event-B formulas to code. We illustrate the approach using a small case study, where we add a theory of arrays, and specify translation rules for generating Ada code.
منابع مشابه
Templates for Event-B Code Generation
The Event-B method, and its tools, provide a way to formally model systems; Tasking Event-B is an extension facilitating code generation. We have recently begun to explore how we can configure the code generator, for deployment on different target systems. In this paper, we describe how templates can be used to avoid hard-coding ‘boilerplate’ code, and how to merge this with code generated from...
متن کاملBuilding on the DEPLOY Legacy: Code Generation and Simulation
The RODIN, and DEPLOY projects have laid solid foundations for further theoretical, and practical (methodological and tooling) advances with Event-B; we investigated code generation for embedded, multi-tasking systems. This work describes activities from a follow-on project, ADVANCE; where our interest is co-simulation of cyber-physical systems. We are working to better understand the issues ar...
متن کاملExtensions to Modelica for efficient code generation and separate compilation
In the current Modelica specification, the only admitted external entities are memory-less functions. We propose an extension to allow parts of the model containing internal states, conditioning and discrete dynamics, to be definable as external functions. This opens the door to separate compilation of Modelica code. For this purpose, we introduce the language construct switchwhen and the type ...
متن کاملA Comparative Analysis of Behavioral Theories towards Farmers’ Water Conservation
According to experts, the inefficient agricultural sector has a dominant role in degrading water resources all over the world. Farmers’ conservational behavior is an important aspect of new integrated water management studies. Relevantly, various behavioral theories have been proposed in the field of environmental psychology. The main objective of the present comparative analysis and review stu...
متن کاملAutomatic Generation of C from Event-B
Event-B [15] is a formal modeling method intended to support refinement, an initial system description at a high level of abstraction with detail added in successive understandable steps. The refinement process may be carried to its logical conclusion, specification of all detail needed to define an executable in a high-level language, and automatic generation of source code from the model via ...
متن کامل